1. Field of the Invention
The present invention relates to a sensor including a detection element, an analog front end and a digital back end; the digital back end is to be connected to a control unit via a digital interface, the sensor providing sampled data in the digital back end. The present invention further relates to a method for assigning a piece of time information to sampled measuring data of a sensor.
2. Description of the Related Art
U.S. Pat. No. 7,382,780 B1 describes retrospective time synchronization using sample value counters and a real-time clock as well as the collection of data in frames. The document does not relate to sub-sampling interval times.
A sensor is typically composed of a detection element, an analog front end and a digital back end, as is apparent from FIG. 1. The detection element converts the physical variable to be measured into an analog signal, and the analog front end controls the detection element and processes the analog signal, converting the same into a digital signal. The digital back end carries out data filtering, event creation, and control of the analog front end, for example. One or multiple sensors is/are connected via a digital interface of the digital sensor back end to a control unit, for example, an application processor in a smart phone or Internet tablet, a dedicated microcontroller (μC), or an arbitrary other implementation of a control unit as hardware or software. The sensor samples sensor data at a configurable output data rate odr and stores the processed sensor data sample values in the digital back end. If necessary, the digital back end may include a FIFO memory for storing the sensor data. The control unit reads out the sensor data from the digital back end via the digital interface. The sensors have no notion of the global time, i.e., during processing of the sensor data in the control unit, it is typically assumed that the time at which the control unit reads out the sensor data is identical to the time at which the sensor data were sampled.
Sensors typically implement filter functions, for example, a low-pass filter, having a particular bandwidth limit.
The output data rate of the sensor often depends on ambient parameters such as the temperature. If these parameters change, fluctuations of 10% of the output data rate are not uncommon. The control unit, having an independent and typically more precise time reference, reads out the data asynchronously from the sensor at a read-out data rate rdr as shown in FIG. 2.
Each sample interval box 10 indicates a new sensor data sample value, which is stored in the digital part; the arrows at the bottom indicate read-outs 30 of the control unit from the sensor, which in this example occur more frequently than the sensor generates output data. Since it is typically assumed that the sensor data sample time and the sensor data read-out time are identical, this means that the delay between the generation of output data and the read-out is not taken into consideration. This assumption introduces time jitter, which is indicated by jitter boxes 20. The average jitter added by the described mechanism is given byjitteraverage=MIN(1/odr,1/rdr)/2.
Often, data from more than one sensor are used to calculate fusion data, for example, orientation in the space or position of a mobile device. These techniques are often used in inertial measurement units (IMUs). Jitter impairs the accuracy of the calculated data.
In addition to the mismatch between odr and rdr there is latency, which may impact certain applications, for example, real-time game applications.
There are three known approaches to the above-described problem. Increasing the read-out data rate rdr reduces the average jitter according to the equation for jitteraverage. Increasing the output data rate odr reduces the average jitter according to the equation for jitteraverage. The increase in the output data rate is supported by present sensors, for example, the triaxial acceleration sensor BMA255 Digital. Triggering read-outs by interrupts is another technique, which is intended to require the sensor to send an interrupt to the control unit when new data are available. This then initiates the read-out of data from the sensor.
However, these known approaches may have several disadvantages. Increasing the read-out data rate rdr increases the workload for the control unit. If the control unit is implemented as software and the executing processor has only low utilization, this approach increases the number of transitions of the executing processor from inactive to on-states, whereby the power consumption is significantly increased.
Increasing the output data rate odr means that noise on the sensor data is increased when the sampling rate is increased. If only the output data rate is changed independently of the bandwidth of the low-pass filter, the implementation of the digital back end becomes more complex. This increases the required silicon surface and the power consumption of the digital back end. As a result, the costs for the sensor hardware and for operating the sensor increase.
Triggering read-outs by interrupts requires separate lines for the interrupt signal, in addition to the typical interfaces such as I2C, thus adding costs. In addition, processing interrupts by software on the control unit is not very efficient since an interrupt requires a context change in the processor. This impacts the cache hit ratios in the processor and similar performance capability parameters. If a large number of sensors is connected to one processor, this approach does not scale well. Moreover, interrupts are not directly supplied in many modern mobile platforms, and the approach thus deals with the problem only partially.